package com.lulufind.lulu.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.lulufind.lulu.model.Demand;
import com.lulufind.lulu.vo.DemandInfoVO;

public interface DemandMapper {

	public int save(Demand demand);
	public int updateStatus(@Param("demandId")int demandId, @Param("demandStatus")int demandStatus);
	public int updateExist(@Param("demandId")int demandId, @Param("demandExist")int demandExist);
	public Double checkDemandPrice(@Param("demandId")Integer demandId);
	public Integer checkDemandUser(@Param("demandId")Integer demandId);
	public DemandInfoVO findDemandInfo(@Param("demandId")int demandId);
	public List<DemandInfoVO> findDemandInfoByPlace(@Param("userLat")double userLat, @Param("userLng")double userLng, @Param("rangeLat")double rangeLat, @Param("rangeLng")double rangeLng, @Param("userId")int userId);
	public List<DemandInfoVO> findDemandInfoByUser(@Param("userId")double userId, @Param("fromUserId")int fromUserId);
}
